<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0px;
        }
        body{
            font-family: "微软雅黑", arial;
            font-size: 14px;
        }
        /*两端对齐*/
        .wrap{width: 80%;margin: 50px auto 0px;}
        .content{
            display: table;
            width: 100%;
            min-width: 320px;
            max-width: 1000px;
            margin: 10px auto;
            border: 1px solid #CCCCCC;
        }
        .img-box{
            display: table-cell;
            width: 100px;
            border: 1px solid red;
            vertical-align: middle;
            text-align: center;
            background: #979797;
        }
        
        .text-box{
            margin-left: 20px;
            padding: 10px;
            border: 1px solid #D0D0D0;
        }
        
    </style>
</head>
<body>
    <div class="wrap">
        <p>两box实现等高对齐</p>
        <div class="content">
            <div class="img-box"><p>dkssdzvdfzgvdfhsdhgjsdghieourhieufhjksdfgsdjhfdu</p></div>
            <div class="text-box">
                <span>左侧的box的高度始终跟随右侧的box的高度变化而变化</span>
                <p>案例不对右侧的box设置display:table-cell，只对左侧设置，所以就会出现左侧跟随右侧高度变化而变化。</p>
                <p>如果要实现不管两个box哪个高度产生变化另一个就跟随，只需要把右侧的box也设置成display:table－cell就可以实现了。</p>
            </div>
        </div>
    </div>

    
</body>
</html>